<template>
  <div class="project-List">
    <nuxt-link :to="`/product/${projectData.product_id}`">
      <div
        class="project-List-photo"
        :style="{background: `url('${ projectData.images[0].thumbnail_url }') center center no-repeat`,backgroundSize:'100% 100%'}"
      />
    </nuxt-link>
    <nuxt-link :to="`/product/${projectData.product_id}`">
      <div class="project-List-content">
        <div class="project-List-content-title">
          <div class="project-List-content-title-icon" />
          <div class="project-List-content-title-text">
            {{ projectData.product_name }}
          </div>
        </div>
        <div class="project-List-content-doctor-wrap">
          <div class="project-List-content-doctor">
            {{ projectData.package.package_name }} | {{ projectData.package.package_detail.doctor.doctor_title }}
          </div>
          <div class="project-List-content-hospital">
            {{ projectData.package.doctor.user_attributes.hospital_name }}
          </div>
        </div>
        <div class="project-List-content-project-price-wrap">
          <div class="project-List-content-project-price">
            <div class="project-List-content-project-selling-price">
              ￥{{ projectData.package.sale.selling_price }}
            </div>
            <div class="project-List-content-project-original-price">
              ￥{{ projectData.package.sale.original_price }}
            </div>
          </div>
          <div class="project-List-content-project-about">
            {{ projectData.place_count }}人预约
          </div>
        </div>
      </div>
    </nuxt-link>
  </div>
</template>
<script>
export default {
  props: {
    projectData: {
      type: Object,
      default: () => { }
    }
  },
  data() {
    return {

    }
  },
  mounted() {
    // console.log(this.projectData, '00')
  }
}
</script>
<style scoped lang="scss">
.project-List {
  margin-bottom: 10px;
}
.project-List-photo {
  width: 266px;
  height: 246px;
  border-radius: 4px 4px 0px 0px;
}
.project-List-photo:hover {
  cursor: pointer;
}
.project-List-content:hover {
  cursor: pointer;
}
.project-List-content {
  width: 266px;
  height: 137px;

  .project-List-content-title {
    margin-top: 10px;
    display: flex;
    position: relative;
    .project-List-content-title-icon {
      width: 20px;
      height: 20px;
      background: url("~assets/img/volume-icon.png") center center no-repeat;
      background-size: 100% 100%;
      position: absolute;
    }
    .project-List-content-title-text {
      width: 266px;
      height: 45px;
      font-size: 16px;
      font-weight: 600;
      color: rgba(51, 51, 51, 1);
      line-height: 22px;
      margin-left: 7px;
      text-overflow: -o-ellipsis-lastline;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      text-indent: 1em;
    }
  }
  .project-List-content-doctor-wrap {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 400;
    color: rgba(153, 153, 153, 1);
    line-height: 17px;
  }
  .project-List-content-project-price-wrap {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    align-items: center;
    .project-List-content-project-price {
      display: flex;
      .project-List-content-project-selling-price {
        font-size: 16px;
        color: rgba(255, 59, 88, 1);
        line-height: 18px;
        font-weight: 600;
      }
      .project-List-content-project-original-price {
        font-size: 12px;
        color: rgba(153, 153, 153, 1);
        line-height: 14px;
        margin-left: 8px;
        margin-top: 4px;
        text-decoration: line-through;
      }
    }
    .project-List-content-project-about {
      font-size: 12px;
      font-weight: 400;
      color: rgba(153, 153, 153, 1);
      line-height: 17px;
    }
  }
}
</style>
